package sys.model;

import static com.util.DateUtil.DateToPatternString;
import static com.util.DateUtil.StringToPatternString;

/**
 * Created by yj on 2017/3/26.
 * 备份
 */
public class Backups {
    private String name;
    private String filepath;
    private String time;

    public Backups(String name, String filepath) {
        this.name = name;
        this.filepath = filepath;
        time=DateToPatternString(StringToPatternString(name,"yyyyMMddHHmmss"),"yyyy-MM-dd HH:mm:ss");
        if(time==null){
            time="未知时间";
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFilepath() {
        return filepath;
    }

    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}
